<!-- 表单页面 -->
<template>
  <div>
    <div class="m-3 p-3 bg-white shadow-sm">
      <upload-progress :progress="progress" />
    </div>
    <div class="m-3 p-5 bg-white shadow-sm">
      <!-- <el-descriptions title="表单组件" :column="1" :border="true"></el-descriptions> -->
    </div>
  </div>
</template>

<script setup>
import DragUpload from "@/components/upload/DragUpload/index.vue"
import SingleUpload from "@/components/upload/SingleUpload/index.vue"

import UploadProgress from "@/components/upload/UploadProgress/index.vue"
import http from "@/utils/js/http.js"
import { reactive, ref } from "vue"
const fileList = reactive({
    drag: [],
    sigle: [],
})
const progress = ref(0)
const upload = async (type) => {
    for (let item of fileList[type]) {
        var formData = new FormData()
        formData.append("file", item.raw)
        const res = await http.upload("/upload/test", formData, (e) => {
            progress.value = ((e.loaded / e.total) * 100).toFixed(2)
        })
    }
}
</script>

<style lang="scss" scoped></style>
>
